package com.lightsh.mapdemo;

import java.util.ArrayList;

import android.graphics.drawable.Drawable;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class MyItemizedOverlay extends ItemizedOverlay<MyOverlayItem>{
	
	private ArrayList<MyOverlayItem> mItemList = new ArrayList<MyOverlayItem>();

	public MyItemizedOverlay(Drawable defaultMarker) {
		super(boundCenterBottom(defaultMarker));
	}

	@Override
	protected MyOverlayItem createItem(int i) {
		return mItemList.get(i);
	}
	
	public void addOverlayItem(MyOverlayItem item){
		mItemList.add(item);
		populate();
	}

	@Override
	public int size() {
		return mItemList.size();
	}

}
